package cfca.seal.web.action.assist;

import cfca.seal.system.Env;
import cfca.seal.web.system.SessionManager;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping({"/frame"})
public class FrameAction
{
  private static final String framePage_prefix = "sys/frame";

  @RequestMapping(value={"/middle"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
  public String frame(ModelMap map, HttpServletRequest request)
  {
    return "sys/frame/frame.html";
  }

  @RequestMapping(value={"/top"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
  public String top(ModelMap map, HttpServletRequest request) {
    map.addAttribute("Name", SessionManager.getName(request));
    map.addAttribute("version", Env.version);
    map.addAttribute("urlType", SessionManager.getUrlType(request));
    return "sys/frame/top.html";
  }

  @RequestMapping(value={"/left"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
  public String left(ModelMap map, HttpServletRequest request) {
    return "sys/frame/left.html";
  }

  @RequestMapping(value={"/right"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
  public String right(ModelMap map, HttpServletRequest request) {
    return "sys/frame/right.html";
  }

  @RequestMapping(value={"/footer"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
  public String foot(ModelMap map, HttpServletRequest request) {
    return "sys/frame/footer.html";
  }
}